<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // let arr = ['apple','banana','orange','pear','ege'];

        // let [a,b,o,p] = arr;
        // console.log(a,b,o,p);

        // let [a,,o] = arr;
        // console.log(o);

        // let [a,b,...arr2] = arr;
        // console.log(a,b);
        // console.log(arr2);

        // let [a,b]= arr;
        // [b,a] = [a,b];
        // console.log(b);
        // console.log(a);

        // let [a,b,c,d,e="cherry"] = arr;
        // console.log(a,b,c,d,e);

        let arr = ['apple','banana','orange','pear','ege']; 

        // let arr2 = arr;
        // console.log(arr2 === arr);

        // let arr2 = arr.concat();
        // console.log(arr2);
        // console.log(arr2 === arr);

        // let [...arr2] = arr;
        // console.log(arr2);
        // console.log(arr2 === arr);

        

    </script>
</body>
</html>